using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class FollowMouse : MonoBehaviour
{
    Vector2 startPos = new Vector2(0, 0);
    Vector2 movePlus;
    private Animator animator;


    void Start()
    {
        movePlus = Vector2.zero;
        animator = GetComponent<Animator>();
    }

    // Update is called once per frame
    void Update()

    {
           


        Vector2 mouseMove = new Vector2(Input.GetAxis("Mouse X"), Input.GetAxis("Mouse Y"));
            movePlus += mouseMove;
            movePlus *= 0.99f;
            transform.position = startPos + movePlus * 0.3f;
       
    }

    private void destroy()
    {
        animator.enabled = false;
    }


}
